﻿<!DOCTYPE html>
<html>
<head>
    <title>数据管理</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">


    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link href="/ViewV5/CSS/bootstrap3.3.5/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/index.css?v=1">
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/default.css">
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_533449_naak7odp5x.css" />

    <style>
        .el-button-group button {
            border-radius: 0px;
        }

        .widthmax {
            width: 100%
        }

        .pd40 {
            padding: 40px;
        }

        .pd0 {
            padding: 0;
        }
    </style>
</head>
<body class="BG">
    <div id="DATABI_DSETZZ" class="FormV">
        <el-container>
            <el-main class="elmain pd40">
                <el-table :data="kcdata.filter(data => !search || data.kcmc.toLowerCase().includes(search.toLowerCase()))"  class="qjTable" height="550px" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" element-loading-background="rgba(0, 0, 0, 0.8)" stripe border fit use-virtual big-data-checkbox>
                    <el-table-column type="selection" width="45" fixed="left">
                    </el-table-column>
                    <el-table-column prop="kcmc" width="180">
                        <template slot="header" slot-scope="scope">
                            <div style="padding:0px">
                                课程名称
                            </div>
                            <el-input v-model="search"
                                      size="mini"
                                      placeholder="输入教材名称搜索" style="padding:0PX;width:100PX" />
                        </template>
                    </el-table-column>
                    <el-table-column prop="jsmc"
                                     label="上课教师">
                    </el-table-column>
                    <el-table-column prop="score"
                                     label="人数">
                    </el-table-column>
                </el-table>

                <el-table class="qjTable" :data="sjdata" height="350px" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" element-loading-background="rgba(0, 0, 0, 0.8)" highlight-current-row stripe border fit use-virtual big-data-checkbox>
                    <el-table-column prop="ksz" width="80" label="考试周">
                    </el-table-column>
                    <el-table-column prop="zc" width="70" label="星期">
                    </el-table-column>
                    <el-table-column prop="jc1" label="节次" width="80">
                        <template slot-scope="scope">
                            <span>{{scope.row.jc1}}~{{scope.row.jc2}}</span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="sj" label="考试时间">
                    </el-table-column>
                    <el-table-column label="操作"
                                     width="80">
                        <template slot-scope="scope">
                            <el-button @click="handleClick(scope.row)" type="text" size="small">选中</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <el-table class="qjTable" :data="jsdata" height="350px" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" element-loading-background="rgba(0, 0, 0, 0.8)" highlight-current-row stripe border fit use-virtual big-data-checkbox>
                    <el-table-column type="index" width="60" fixed="left"> </el-table-column>
                    <el-table-column prop="jse" label="教室" width="150">
                        <template slot-scope="scope">
                            <el-tag type="primary" disable-transitions>{{scope.row.jse}}-{{scope.row.gn}}</el-tag>
                        </template>
                    </el-table-column>
                    <el-table-column prop="kszw" label="座位数量">
                    </el-table-column>
                </el-table>
            </el-main>
        </el-container>

    </div>
    <script src="/ViewV5/JS/vue.js"></script>
    <script type="text/javascript" src="/ViewV5/JS/jquery-1.11.2.min.js"></script>
    <script src="/ViewV5/JS/lodash.min.js"></script>
    <script src="/ViewV5/JS/httpVueLoader.js"></script>
    <script src="/ViewV5/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script src="/ViewV5/JS/element/pltable/index.js"></script>

    <script src="/ViewV5/JS/bijs.js?v=4"></script>
    <script>
        var app = new Vue({
            el: '#DATABI_DSETZZ',
            components: {
                'base-loading': httpVueLoader('/ViewV5/Base/Vue/Loading.vue'),
            },
            data: {
                search: "",
                kcdata: [],
                sjdata: [],
                jsdata: []

            },
            methods: {
                getRowKeys: function (row) {
                    return row.index;
                },
                handleClick: function (rowdata) {
                    var pro = this;
                    $.getJSON('/API/VIEWAPI.ashx?Action=KSGL_GETKJSBYSJ', { P1: rowdata.sjxx, xq: "20-21-2", rs: "30" }, function (resultData) {
                        if (!resultData.ErrorMsg) {
                            pro.jsdata = resultData.Result;
                        }
                    })
                },
            },
            mounted: function () {
                var pro = this;
                pro.$nextTick(function () {
                    $.getJSON('/API/VIEWAPI.ashx?Action=KSGL_GETDBKSJ', { P1: "1", xq: '20-21-2' }, function (resultData) {
                        if (!resultData.ErrorMsg) {
                            pro.kcdata = resultData.Result1;
                            pro.sjdata = resultData.Result2;
                            //pro.tableop.loading = false;

                        }
                    })
                })
            },
            created() {
            },
            watch: {

            }

        })


    </script>

</body>

</html>